package edu.thu.studio.ormdesigner.editor.dialog;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.gef.EditPartViewer;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.TabFolder;

import edu.thu.studio.ormdesigner.common.ValidatableTabWrapper;
import edu.thu.studio.ormdesigner.editor.dialog.tab.view.GeneralTabWrapper;
import edu.thu.studio.ormdesigner.editor.dialog.tab.view.SQLTabWrapper;
import edu.thu.studio.ormdesigner.model.orm.view.View;
import edu.thu.studio.ormdesigner.util.Properties;

public class ViewDialog extends NodeDialog {
    
    private View view;
    
    public ViewDialog(Shell parentShell, EditPartViewer viewer, View view) {
        super(parentShell, viewer);
        this.view = view;
    }
    
    @Override
    protected List<ValidatableTabWrapper> createTabWrapperList(TabFolder tabFolder) {
        List<ValidatableTabWrapper> list = new ArrayList<ValidatableTabWrapper>();
        list.add(new GeneralTabWrapper(this, tabFolder, view));
        list.add(new SQLTabWrapper(this, tabFolder,view));
        return list;
    }
    
    @Override
    protected String getTitle() {
        return Properties.diagram_label_view;
    }
    
}
